package com.mxdx.edu.common;

import java.util.List;
import java.util.Map;

import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.MySqlMapper;

/**
 * 基础dao
 * 
 * @author wangyuan
 * @date 2016-11-24
 *
 * @param <T>
 */
public interface BaseDao<T> extends Mapper<T>, MySqlMapper<T> {

    /**
     * 查询数据
     * 
     * @param params 查询条件Map
     * @return List
     */
    List<Map<String, Object>> findListByMap(Map<String, Object> params);

    /**
     * 更新数据
     * 
     * @param entity 实体DTO
     * @return int
     */
    int update(T entity);

    /**
     * 更新数据
     * 
     * @param paraMap 更新参数Map
     * @return int
     */
    int updateByMap(Map<String, Object> paraMap);

    List<Map<String, Object>> findSchoolmateByMap(Map<String, Object> param);
    List<Map<String, Object>> findFriendsByMap(Map<String, Object> param);
    List<Map<String, Object>> findFcirlsByMap(Map<String, Object> param);
    List<Map<String, Object>> findCirlsByMap(Map<String, Object> param);
    List<Map<String, Object>> findSfridByMap(Map<String, Object> param);
    List<Map<String, Object>> findNfridByMap(Map<String, Object> param);
    int updateStlistByMap(Map<String, Object> paraMap);

    /**
     * 修改密码
     *
     * @param paraMap 修改密码Map
     * @return int
     */
    int updatePwdByMap(Map<String, Object> paraMap);

}
